<template>
  <div id="app">
    <transition
      :name="transitionName"
                >
      <router-view  class="child-view"></router-view>
    </transition>
  </div>
</template>

<script>
export default {
  name: 'App',
  data () {
    return {
      transitionName: 'slide-left'
    }
  },
  watch: {
    '$route' (to, from) {
      if(parseInt(from.meta.index)<parseInt(to.meta.index)){//前进
        this.transitionName = 'slide-left';
      }else{
        this.transitionName = 'slide-right';
      }
      console.log(this.transitionName);
    }
  },
  components: {}
}

</script>

<style>
  *{
    padding: 0;
    margin: 0;
  }

  .child-view {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    transition: all .5s cubic-bezier(.55,0,.1,1);
  }
  .slide-left-enter, .slide-right-leave-active {
    opacity: 0;
    -webkit-transform: translate(30px, 0);
    transform: translate(30px, 0);
  }
  .slide-left-leave-active, .slide-right-enter {
    opacity: 0;
    -webkit-transform: translate(-30px, 0);
    transform: translate(-30px, 0);
  }




  #app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
.mint-cell-wrapper {
  background-image: -webkit-linear-gradient(top, #fff, #fff 50%, transparent 50%) !important;
  background-image: linear-gradient(180deg, #fff, #fff 50%, transparent 50%) !important;

}
.mint-cell:last-child {
  background-image: -webkit-linear-gradient(top, #fff, #fff 50%, transparent 50%) !important;
  background-image: linear-gradient(180deg, #fff, #fff 50%, transparent 50%) !important;
}
.myrow .mint-cell {
  min-height: 39px;
}
  .myrow .mint-field-core{
    text-align: center;
  }
  #checklist .mint-cell{
    width: 44%;
    float: right;
  }
  .myrow .mint-field .mint-cell-title{
    width: 25%;
  }
  #checklist .mint-cell-wrapper{
    text-align: left;
  }
  .ql-container.ql-snow{
    border: none;
  }
  .mint-toast-text{
    background-color: rgba(0, 0, 0, -1.7);
  }
  .cube-select-icon{
    display: none;
  }
  .cube-input-field{
  height:50px;
}
  .ql-editor p{
    font-size: 16px;
    line-height: 30px;
  }
</style>
